<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>zxxhouse: src/com/zxx/sql/sqlMan.java源文件</title>

<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css" />



</head>
<body>
<div id="top"><!-- do not remove this div! -->


<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  
  
  <td style="padding-left: 0.5em;">
   <div id="projectname">zxxhouse
   &#160;<span id="projectnumber">1.0</span>
   </div>
   
  </td>
  
  
  
 </tr>
 </tbody>
</table>
</div>

<!-- 制作者 Doxygen 1.7.6.1 -->
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>首页</span></a></li>
      <li><a href="annotated.html"><span>类</span></a></li>
      <li class="current"><a href="files.html"><span>文件</span></a></li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>文件列表</span></a></li>
    </ul>
  </div>
</div>
<div class="header">
  <div class="headertitle">
<div class="title">src/com/zxx/sql/sqlMan.java</div>  </div>
</div><!--header-->
<div class="contents">
<div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="keyword">package </span>com.zxx.sql;
<a name="l00002"></a>00002 
<a name="l00003"></a>00003 <span class="keyword">import</span> java.io.InputStream;
<a name="l00004"></a>00004 <span class="keyword">import</span> java.util.ArrayList;
<a name="l00005"></a>00005 
<a name="l00006"></a>00006 <span class="keyword">import</span> jxl.Sheet;
<a name="l00007"></a>00007 <span class="keyword">import</span> jxl.Workbook;
<a name="l00008"></a>00008 <span class="keyword">import</span> android.content.Context;
<a name="l00009"></a>00009 <span class="keyword">import</span> android.content.res.Resources;
<a name="l00010"></a>00010 <span class="keyword">import</span> android.util.Log;
<a name="l00011"></a>00011 
<a name="l00012"></a>00012 <span class="keyword">import</span> com.soufang.ui.*;
<a name="l00013"></a>00013 <span class="keyword">import</span> com.zxx.common.Common;
<a name="l00014"></a>00014 
<a name="l00020"></a><a class="code" href="classcom_1_1zxx_1_1sql_1_1sql_man.html">00020</a> <span class="keyword">public</span> <span class="keyword">class </span><a class="code" href="classcom_1_1zxx_1_1sql_1_1sql_man.html" title="数据库管理类">sqlMan</a> {
<a name="l00021"></a>00021         
<a name="l00022"></a>00022         <span class="keyword">private</span> <span class="keyword">static</span> <a class="code" href="classcom_1_1zxx_1_1sql_1_1sql_man.html" title="数据库管理类">sqlMan</a> sDataMan; 
<a name="l00023"></a>00023         <span class="keyword">private</span> <a class="code" href="classcom_1_1zxx_1_1sql_1_1_data_base_helper.html" title="直接操作数据库类，sqlman调用该类">DataBaseHelper</a> mHelper;
<a name="l00024"></a>00024         <span class="keyword">private</span> Context mAppContext;
<a name="l00025"></a>00025         <span class="keyword">private</span> <a class="code" href="classcom_1_1zxx_1_1sql_1_1house_data.html" title="搜房数据信息类">houseData</a> mhouseData;
<a name="l00026"></a>00026                 
<a name="l00027"></a>00027         <span class="keyword">private</span> <span class="keywordtype">int</span>[] houseTypeIds = <span class="keyword">new</span> <span class="keywordtype">int</span>[] {
<a name="l00028"></a>00028                           R.string.oneRoom, R.string.twoRoom, R.string.threeRoom
<a name="l00029"></a>00029           };
<a name="l00030"></a>00030          
<a name="l00031"></a>00031         <span class="keyword">private</span> <span class="keyword">enum</span> TOTALPRICEKIND{
<a name="l00032"></a>00032                 ALL,
<a name="l00033"></a>00033                 BELOW100W,
<a name="l00034"></a>00034                 BETWEEN100W_200W,
<a name="l00035"></a>00035                 ABOVE_200W;
<a name="l00036"></a>00036         }
<a name="l00037"></a>00037         
<a name="l00038"></a>00038         <span class="keyword">private</span> <span class="keyword">enum</span> PMPRICEKIND{
<a name="l00039"></a>00039                 BELOW1W,
<a name="l00040"></a>00040                 BETWEEN1W_2W,
<a name="l00041"></a>00041                 ABOVE_2W;
<a name="l00042"></a>00042         }
<a name="l00043"></a>00043         
<a name="l00044"></a>00044         <span class="keyword">private</span> <a class="code" href="classcom_1_1zxx_1_1sql_1_1sql_man.html" title="数据库管理类">sqlMan</a>(Context appContext) {
<a name="l00045"></a>00045         mAppContext = appContext;
<a name="l00046"></a>00046         mHelper = <span class="keyword">new</span> <a class="code" href="classcom_1_1zxx_1_1sql_1_1_data_base_helper.html" title="直接操作数据库类，sqlman调用该类">DataBaseHelper</a>(mAppContext);
<a name="l00047"></a>00047        
<a name="l00048"></a>00048     }
<a name="l00049"></a>00049         
<a name="l00054"></a><a class="code" href="classcom_1_1zxx_1_1sql_1_1sql_man.html#ad59ab25ed879f94b9809f858dbbeb16d">00054</a>          <span class="keyword">public</span> <span class="keyword">static</span> <a class="code" href="classcom_1_1zxx_1_1sql_1_1sql_man.html" title="数据库管理类">sqlMan</a> <span class="keyword">get</span>(Context c) {
<a name="l00055"></a>00055                 <span class="keywordflow">if</span> (sDataMan == null) {
<a name="l00056"></a>00056                     <span class="comment">// we use the application context to avoid leaking activities</span>
<a name="l00057"></a>00057                         sDataMan = <span class="keyword">new</span> <a class="code" href="classcom_1_1zxx_1_1sql_1_1sql_man.html" title="数据库管理类">sqlMan</a>(c.getApplicationContext());
<a name="l00058"></a>00058                 }
<a name="l00059"></a>00059                 <span class="keywordflow">return</span> sDataMan;
<a name="l00060"></a>00060             }
<a name="l00061"></a>00061 
<a name="l00066"></a><a class="code" href="classcom_1_1zxx_1_1sql_1_1sql_man.html#ade630bd22dc7fdafbcb853061b6912f1">00066</a>          <span class="keyword">public</span> <span class="keywordtype">long</span> <a class="code" href="classcom_1_1zxx_1_1sql_1_1sql_man.html#ade630bd22dc7fdafbcb853061b6912f1">insertData</a>()
<a name="l00067"></a>00067          {
<a name="l00068"></a>00068                  <span class="keywordtype">int</span> idCount = 0;
<a name="l00069"></a>00069                  
<a name="l00070"></a>00070                  <span class="keywordflow">try</span> {
<a name="l00071"></a>00071                          
<a name="l00072"></a>00072                          Resources r = mAppContext.getResources();
<a name="l00073"></a>00073                          InputStream in  = r.openRawResource(R.raw.house);
<a name="l00074"></a>00074                          Workbook wb = Workbook.getWorkbook(in);
<a name="l00075"></a>00075                          Sheet sheet = wb.getSheet(0);
<a name="l00076"></a>00076                          <span class="keywordtype">int</span> row = sheet.getRows();
<a name="l00077"></a>00077                          <span class="keywordtype">int</span> cols = sheet.getColumns();
<a name="l00078"></a>00078                          <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = 1; i &lt; row; ++i) {
<a name="l00079"></a>00079                                  String titleContents = sheet.getCell(0,i).getContents();
<a name="l00080"></a>00080                                  <span class="keywordflow">if</span>( (null != titleContents) &amp;&amp; (titleContents.length() &gt;0 ) ) {
<a name="l00081"></a>00081                                          mhouseData = <span class="keyword">new</span> <a class="code" href="classcom_1_1zxx_1_1sql_1_1house_data.html" title="搜房数据信息类">houseData</a>();
<a name="l00082"></a>00082                                          <span class="comment">//getCell(col,row)</span>
<a name="l00083"></a>00083                                          mhouseData.setMtitle(titleContents);
<a name="l00084"></a>00084                                          mhouseData.setMdepartMentName(sheet.getCell(1,i).getContents());
<a name="l00085"></a>00085                                          mhouseData.setMaddress(sheet.getCell(2,i).getContents());
<a name="l00086"></a>00086                                          Integer totalPrice = <span class="keyword">new</span> Integer(sheet.getCell(3,i).getContents());
<a name="l00087"></a>00087                                          mhouseData.setMtotalprice(totalPrice);
<a name="l00088"></a>00088                                          Integer pmPrice = <span class="keyword">new</span> Integer(sheet.getCell(4,i).getContents());
<a name="l00089"></a>00089                                          mhouseData.setMpmPrice(pmPrice);
<a name="l00090"></a>00090                                          mhouseData.setMorientation(sheet.getCell(5,i).getContents());
<a name="l00091"></a>00091                                          mhouseData.setMhouseType(sheet.getCell(6,i).getContents());
<a name="l00092"></a>00092                                          mhouseData.setMdecorate(sheet.getCell(7,i).getContents());
<a name="l00093"></a>00093                                          mhouseData.setMarea(sheet.getCell(8,i).getContents());
<a name="l00094"></a>00094                                          mhouseData.setMbuildType(sheet.getCell(9,i).getContents());
<a name="l00095"></a>00095                                          mhouseData.setMlouchen(sheet.getCell(10,i).getContents());
<a name="l00096"></a>00096                                          Integer year = <span class="keyword">new</span> Integer(sheet.getCell(11,i).getContents());
<a name="l00097"></a>00097                                          mhouseData.setMbuildAge(year);
<a name="l00098"></a>00098                                          mhouseData.setMpicPath1(sheet.getCell(12,i).getContents());
<a name="l00099"></a>00099                                          mhouseData.setMpicPath2(sheet.getCell(13,i).getContents());
<a name="l00100"></a>00100                                          mhouseData.setMpicPath3(sheet.getCell(14,i).getContents());
<a name="l00101"></a>00101                                          mhouseData.setMpicPath4(sheet.getCell(15,i).getContents());
<a name="l00102"></a>00102                                          mhouseData.setMpicPath5(sheet.getCell(16,i).getContents());
<a name="l00103"></a>00103                                         
<a name="l00104"></a>00104                                          <span class="keywordflow">if</span>(!mHelper.<a class="code" href="classcom_1_1zxx_1_1sql_1_1_data_base_helper.html#a64cc784e2906df5e67508069246f91c7" title="查询数据库是不是有重复数据">selectRepeatData</a>(mhouseData))
<a name="l00105"></a>00105                                          {
<a name="l00106"></a>00106                                                  mHelper.<a class="code" href="classcom_1_1zxx_1_1sql_1_1_data_base_helper.html#a142d88439400d7dcff3ca070cd0fca54" title="建立数据表">insertData</a>(mhouseData);
<a name="l00107"></a>00107                                          }<span class="keywordflow">else</span> {
<a name="l00108"></a>00108                                                  <span class="keywordflow">return</span> -1;
<a name="l00109"></a>00109                                          }
<a name="l00110"></a>00110                                         
<a name="l00111"></a>00111                                  }
<a name="l00112"></a>00112                                  
<a name="l00113"></a>00113                          }
<a name="l00114"></a>00114                           
<a name="l00115"></a>00115                 } 
<a name="l00116"></a>00116                  <span class="keywordflow">catch</span> (Exception e) {
<a name="l00117"></a>00117                         <span class="comment">// TODO Auto-generated catch block</span>
<a name="l00118"></a>00118                          Log.e(<span class="stringliteral">&quot;sqlMan&quot;</span>,<span class="stringliteral">&quot;we got big error here,Exception: &quot;</span>+Log.getStackTraceString(e));
<a name="l00119"></a>00119                         <span class="keywordflow">return</span> -1;
<a name="l00120"></a>00120                 }
<a name="l00121"></a>00121                  <span class="keywordflow">return</span> 0;
<a name="l00122"></a>00122          }
<a name="l00127"></a><a class="code" href="classcom_1_1zxx_1_1sql_1_1sql_man.html#a8220ec6e98f7f681a9e6002367fe780d">00127</a>          <span class="keyword">public</span> ArrayList&lt;houseData&gt; <a class="code" href="classcom_1_1zxx_1_1sql_1_1sql_man.html#a8220ec6e98f7f681a9e6002367fe780d">selectSQLDefault</a>(<span class="keywordtype">int</span> limitindex,<span class="keywordtype">int</span> limitnum)
<a name="l00128"></a>00128          {
<a name="l00129"></a>00129                  <span class="keywordflow">return</span> mHelper.sort_byIDL_H(limitindex,limitnum);
<a name="l00130"></a>00130          }
<a name="l00135"></a><a class="code" href="classcom_1_1zxx_1_1sql_1_1sql_man.html#a51e1619f15f11234a9b2f2e5d45138d9">00135</a>          <span class="keyword">public</span> ArrayList&lt;houseData&gt; <a class="code" href="classcom_1_1zxx_1_1sql_1_1sql_man.html#a51e1619f15f11234a9b2f2e5d45138d9">selectSQLByDepart</a>(<span class="keywordtype">int</span> position,<span class="keywordtype">int</span> limitindex,<span class="keywordtype">int</span> limitnum)
<a name="l00136"></a>00136          {
<a name="l00137"></a>00137                  <span class="keywordflow">if</span>(0 == position){
<a name="l00138"></a>00138                          <span class="keywordflow">return</span> mHelper.sort_byIDL_H(limitindex,limitnum);
<a name="l00139"></a>00139                  }<span class="keywordflow">else</span>{
<a name="l00140"></a>00140                          String strText = mAppContext.getResources().getString(<a class="code" href="classcom_1_1zxx_1_1common_1_1_common.html" title="公共通用类，目前包含了消息和字符串">Common</a>.GetDepartMenid(position));
<a name="l00141"></a>00141                          <span class="keywordflow">return</span> mHelper.<a class="code" href="classcom_1_1zxx_1_1sql_1_1_data_base_helper.html#a1ba2df090cac74b2a3281f0df8d8b6ce" title="按小区选择">select_byDepart</a>(strText,limitindex,limitnum);
<a name="l00142"></a>00142                  }
<a name="l00143"></a>00143                  
<a name="l00144"></a>00144          }
<a name="l00149"></a><a class="code" href="classcom_1_1zxx_1_1sql_1_1sql_man.html#a08637e16cd1a288c8bb8ce20ca83e8dc">00149</a>          <span class="keyword">public</span> ArrayList&lt;houseData&gt; <a class="code" href="classcom_1_1zxx_1_1sql_1_1sql_man.html#a08637e16cd1a288c8bb8ce20ca83e8dc">selectSQLByTotalPrice</a>(<span class="keywordtype">int</span> position,<span class="keywordtype">int</span> limitindex,<span class="keywordtype">int</span> limitnum)
<a name="l00150"></a>00150          {
<a name="l00151"></a>00151                  TOTALPRICEKIND kind = TOTALPRICEKIND.values()[position];
<a name="l00152"></a>00152                          <span class="keywordflow">switch</span>(kind)
<a name="l00153"></a>00153                          {
<a name="l00154"></a>00154                           <span class="keywordflow">case</span> ALL:{
<a name="l00155"></a>00155                                  <span class="keywordflow">return</span> mHelper.sort_byIDL_H(limitindex,limitnum);
<a name="l00156"></a>00156                            }
<a name="l00157"></a>00157                            <span class="keywordflow">case</span>  BELOW100W:{
<a name="l00158"></a>00158                                    <span class="keywordflow">return</span> mHelper.<a class="code" href="classcom_1_1zxx_1_1sql_1_1_data_base_helper.html#a4d00facfe50abf683dc52b21f777a067" title="选取数据库中总价在100Ｗ下的房子">select_byTotalPricebelow100W</a>(limitindex,limitnum); 
<a name="l00159"></a>00159                            }
<a name="l00160"></a>00160                            <span class="keywordflow">case</span> BETWEEN100W_200W: {
<a name="l00161"></a>00161                                    <span class="keywordflow">return</span> mHelper.<a class="code" href="classcom_1_1zxx_1_1sql_1_1_data_base_helper.html#aac7ea38dc71810971006c13cc3af3f90" title="选取数据库中总价在100Ｗ——200W之间的房子">select_byTotalPricebetween100_200</a>(limitindex,limitnum);
<a name="l00162"></a>00162                            }
<a name="l00163"></a>00163                            <span class="keywordflow">case</span> ABOVE_200W: {
<a name="l00164"></a>00164                                    <span class="keywordflow">return</span> mHelper.<a class="code" href="classcom_1_1zxx_1_1sql_1_1_data_base_helper.html#a738880bd8d0083701bbbd655af857b3c" title="选取数据库中总价在200Ｗ上的房子">select_byTotalPriceabove200W</a>(limitindex,limitnum);
<a name="l00165"></a>00165                            }
<a name="l00166"></a>00166                            <span class="keywordflow">default</span>:
<a name="l00167"></a>00167                                    <span class="keywordflow">return</span> mHelper.sort_byIDL_H(limitindex,limitnum);
<a name="l00168"></a>00168                          }
<a name="l00169"></a>00169          }
<a name="l00174"></a><a class="code" href="classcom_1_1zxx_1_1sql_1_1sql_man.html#a2a509c26769e627d0aab9adadc276ee1">00174</a>          <span class="keyword">public</span> ArrayList&lt;houseData&gt; <a class="code" href="classcom_1_1zxx_1_1sql_1_1sql_man.html#a2a509c26769e627d0aab9adadc276ee1">selectSQLByHouseType</a>(<span class="keywordtype">int</span> position,<span class="keywordtype">int</span> limitindex,<span class="keywordtype">int</span> limitnum)
<a name="l00175"></a>00175          {
<a name="l00176"></a>00176                  String strText = mAppContext.getResources().getString(houseTypeIds[position]);
<a name="l00177"></a>00177                  <span class="keywordflow">return</span> mHelper.select_byHouseType(strText,limitindex,limitnum);
<a name="l00178"></a>00178          }
<a name="l00183"></a><a class="code" href="classcom_1_1zxx_1_1sql_1_1sql_man.html#a566400e53b2720115f33ef00dfafba4a">00183</a>          <span class="keyword">public</span> ArrayList&lt;houseData&gt; <a class="code" href="classcom_1_1zxx_1_1sql_1_1sql_man.html#a566400e53b2720115f33ef00dfafba4a">selectSQLByZX</a>(<span class="keywordtype">int</span> position,<span class="keywordtype">int</span> limitindex,<span class="keywordtype">int</span> limitnum)
<a name="l00184"></a>00184          {
<a name="l00185"></a>00185                  <span class="keywordtype">int</span> resID = <a class="code" href="classcom_1_1zxx_1_1common_1_1_common.html" title="公共通用类，目前包含了消息和字符串">Common</a>.GetZXid(position);
<a name="l00186"></a>00186                  String strText = mAppContext.getResources().getString(resID);
<a name="l00187"></a>00187                  <span class="keywordflow">return</span> mHelper.select_byzx(strText,limitindex,limitnum);
<a name="l00188"></a>00188          }
<a name="l00193"></a><a class="code" href="classcom_1_1zxx_1_1sql_1_1sql_man.html#aaba0ff9f406a4804784aed9e4f97a811">00193</a>          <span class="keyword">public</span> ArrayList&lt;houseData&gt; <a class="code" href="classcom_1_1zxx_1_1sql_1_1sql_man.html#aaba0ff9f406a4804784aed9e4f97a811">selectSQLByPmPrice</a>(<span class="keywordtype">int</span> position,<span class="keywordtype">int</span> limitindex,<span class="keywordtype">int</span> limitnum)
<a name="l00194"></a>00194          {
<a name="l00195"></a>00195                  PMPRICEKIND kind = PMPRICEKIND.values()[position];
<a name="l00196"></a>00196                          <span class="keywordflow">switch</span>(kind)
<a name="l00197"></a>00197                          {
<a name="l00198"></a>00198                          <span class="keywordflow">case</span> BELOW1W:{
<a name="l00199"></a>00199                                  <span class="keywordflow">return</span> mHelper.<a class="code" href="classcom_1_1zxx_1_1sql_1_1_data_base_helper.html#a5a7ecb58ce31d571efa6232cdff0332a" title="选取数据库中单价小于1W的房子">select_byPmPricebelow1W</a>(limitindex,limitnum);
<a name="l00200"></a>00200                          }
<a name="l00201"></a>00201                          <span class="keywordflow">case</span> BETWEEN1W_2W: {
<a name="l00202"></a>00202                                   <span class="keywordflow">return</span> mHelper.<a class="code" href="classcom_1_1zxx_1_1sql_1_1_data_base_helper.html#a9a3df95a83eba8230a03bfcd91d62620" title="选取数据库中单价在1Ｗ——2W之间的房子">select_byPricebetween1w_2w</a>(limitindex,limitnum);
<a name="l00203"></a>00203                           }
<a name="l00204"></a>00204                           <span class="keywordflow">case</span> ABOVE_2W: {
<a name="l00205"></a>00205                                   <span class="keywordflow">return</span> mHelper.<a class="code" href="classcom_1_1zxx_1_1sql_1_1_data_base_helper.html#ae337350f3219c2a9a30488389cb30a07" title="选取数据库中单价在2Ｗ上的房子">select_byPmPriceabove2W</a>(limitindex,limitnum);
<a name="l00206"></a>00206                           }
<a name="l00207"></a>00207                           <span class="keywordflow">default</span>:
<a name="l00208"></a>00208                                   <span class="keywordflow">return</span> mHelper.<a class="code" href="classcom_1_1zxx_1_1sql_1_1_data_base_helper.html#a5a7ecb58ce31d571efa6232cdff0332a" title="选取数据库中单价小于1W的房子">select_byPmPricebelow1W</a>(limitindex,limitnum);
<a name="l00209"></a>00209                          }
<a name="l00210"></a>00210          }
<a name="l00215"></a><a class="code" href="classcom_1_1zxx_1_1sql_1_1sql_man.html#ac4fc3535f12fcbdcfd091f6ca9b7dd1c">00215</a>          <span class="keyword">public</span> ArrayList&lt;houseData&gt; <a class="code" href="classcom_1_1zxx_1_1sql_1_1sql_man.html#ac4fc3535f12fcbdcfd091f6ca9b7dd1c">sort_byPriceH_L</a>(<span class="keywordtype">int</span> limitindex,<span class="keywordtype">int</span> limitnum)
<a name="l00216"></a>00216          {
<a name="l00217"></a>00217                  <span class="keywordflow">return</span> mHelper.sort_byPriceH_L(limitindex,limitnum);
<a name="l00218"></a>00218          }
<a name="l00224"></a><a class="code" href="classcom_1_1zxx_1_1sql_1_1sql_man.html#a90b2775363d92c63bdc6a25f7fb13ace">00224</a>          <span class="keyword">public</span> ArrayList&lt;houseData&gt; <a class="code" href="classcom_1_1zxx_1_1sql_1_1sql_man.html#a90b2775363d92c63bdc6a25f7fb13ace">sort_byPriceL_H</a>(<span class="keywordtype">int</span> limitindex,<span class="keywordtype">int</span> limitnum)
<a name="l00225"></a>00225          {
<a name="l00226"></a>00226                  <span class="keywordflow">return</span> mHelper.sort_byPriceL_H(limitindex,limitnum);
<a name="l00227"></a>00227          }
<a name="l00233"></a><a class="code" href="classcom_1_1zxx_1_1sql_1_1sql_man.html#a5c98369ec30fdd33c1c3ba3b53e20bbb">00233</a>          <span class="keyword">public</span> ArrayList&lt;houseData&gt; <a class="code" href="classcom_1_1zxx_1_1sql_1_1sql_man.html#a5c98369ec30fdd33c1c3ba3b53e20bbb">sort_byYearH_L</a>(<span class="keywordtype">int</span> limitindex,<span class="keywordtype">int</span> limitnum)
<a name="l00234"></a>00234          {
<a name="l00235"></a>00235                  <span class="keywordflow">return</span> mHelper.sort_byYearH_L(limitindex,limitnum);
<a name="l00236"></a>00236          }
<a name="l00242"></a><a class="code" href="classcom_1_1zxx_1_1sql_1_1sql_man.html#a96e48378ca51ca141c468c29c5b12223">00242</a>          <span class="keyword">public</span> ArrayList&lt;houseData&gt; <a class="code" href="classcom_1_1zxx_1_1sql_1_1sql_man.html#a96e48378ca51ca141c468c29c5b12223">sort_byYearL_H</a>(<span class="keywordtype">int</span> limitindex,<span class="keywordtype">int</span> limitnum)
<a name="l00243"></a>00243          {
<a name="l00244"></a>00244                  <span class="keywordflow">return</span> mHelper.sort_byYearL_H(limitindex,limitnum);
<a name="l00245"></a>00245          }
<a name="l00251"></a><a class="code" href="classcom_1_1zxx_1_1sql_1_1sql_man.html#ace45dff4a0544e8a24d0ca121ec369d0">00251</a>          <span class="keyword">public</span> ArrayList&lt;houseData&gt; <a class="code" href="classcom_1_1zxx_1_1sql_1_1sql_man.html#ace45dff4a0544e8a24d0ca121ec369d0">sort_byAreaL_H</a>(<span class="keywordtype">int</span> limitindex,<span class="keywordtype">int</span> limitnum)
<a name="l00252"></a>00252          {
<a name="l00253"></a>00253                  <span class="keywordflow">return</span> mHelper.sort_byAreaL_H(limitindex,limitnum);
<a name="l00254"></a>00254          }
<a name="l00260"></a><a class="code" href="classcom_1_1zxx_1_1sql_1_1sql_man.html#af8278ce8bab519ebb5d6e909edbfa2cd">00260</a>          <span class="keyword">public</span> ArrayList&lt;houseData&gt; <a class="code" href="classcom_1_1zxx_1_1sql_1_1sql_man.html#af8278ce8bab519ebb5d6e909edbfa2cd">sort_byAreaH_L</a>(<span class="keywordtype">int</span> limitindex,<span class="keywordtype">int</span> limitnum)
<a name="l00261"></a>00261          {
<a name="l00262"></a>00262                  <span class="keywordflow">return</span> mHelper.sort_byAreaH_L(limitindex,limitnum);
<a name="l00263"></a>00263          }
<a name="l00269"></a><a class="code" href="classcom_1_1zxx_1_1sql_1_1sql_man.html#a4de4fb93998425200bce9ac7d8d94385">00269</a>          <span class="keyword">public</span> <span class="keywordtype">int</span> <a class="code" href="classcom_1_1zxx_1_1sql_1_1sql_man.html#a4de4fb93998425200bce9ac7d8d94385">getSqlAllRow</a>(){
<a name="l00270"></a>00270                  <span class="keywordflow">return</span> mHelper.<a class="code" href="classcom_1_1zxx_1_1sql_1_1_data_base_helper.html#ac07978f4e7858ba1fdc4ee3cf70b38c1" title="获取列表剩余项目">getSortListRest</a>();
<a name="l00271"></a>00271          }
<a name="l00277"></a><a class="code" href="classcom_1_1zxx_1_1sql_1_1sql_man.html#a18d6c85da0f0fd72cddd38bed00f6b83">00277</a>         <span class="keyword">public</span> <span class="keywordtype">int</span> <a class="code" href="classcom_1_1zxx_1_1sql_1_1sql_man.html#a18d6c85da0f0fd72cddd38bed00f6b83">getdepartmentAllRow</a>(<span class="keywordtype">int</span> position){
<a name="l00278"></a>00278                 <span class="keywordflow">if</span>(position == 0){
<a name="l00279"></a>00279                         <span class="comment">//区域的第一行是不限</span>
<a name="l00280"></a>00280                         <span class="keywordflow">return</span> mHelper.<a class="code" href="classcom_1_1zxx_1_1sql_1_1_data_base_helper.html#ac07978f4e7858ba1fdc4ee3cf70b38c1" title="获取列表剩余项目">getSortListRest</a>();
<a name="l00281"></a>00281                 }<span class="keywordflow">else</span>{
<a name="l00282"></a>00282                          String strText = mAppContext.getResources().getString(<a class="code" href="classcom_1_1zxx_1_1common_1_1_common.html" title="公共通用类，目前包含了消息和字符串">Common</a>.GetDepartMenid(position));
<a name="l00283"></a>00283                          String args[] = <span class="keyword">new</span> String[]{strText};
<a name="l00284"></a>00284                         <span class="keywordflow">return</span> mHelper.<a class="code" href="classcom_1_1zxx_1_1sql_1_1_data_base_helper.html#a4ad07dffcd6eafdcd227136f6d1bf6d8" title="获取区域剩余项目">getDepartmentRest</a>(args);
<a name="l00285"></a>00285                 }
<a name="l00286"></a>00286         }
<a name="l00292"></a><a class="code" href="classcom_1_1zxx_1_1sql_1_1sql_man.html#a36d1520cc83a606111323bf4ae1b6c01">00292</a>         <span class="keyword">public</span> <span class="keywordtype">int</span> <a class="code" href="classcom_1_1zxx_1_1sql_1_1sql_man.html#a36d1520cc83a606111323bf4ae1b6c01">getTotalPriceAllrow</a>(<span class="keywordtype">int</span> position) {
<a name="l00293"></a>00293                 <span class="keywordflow">if</span>(position == 0){
<a name="l00294"></a>00294                         <span class="comment">//区域的第一行是不限</span>
<a name="l00295"></a>00295                         <span class="keywordflow">return</span> mHelper.<a class="code" href="classcom_1_1zxx_1_1sql_1_1_data_base_helper.html#ac07978f4e7858ba1fdc4ee3cf70b38c1" title="获取列表剩余项目">getSortListRest</a>();
<a name="l00296"></a>00296                 }<span class="keywordflow">else</span>{
<a name="l00297"></a>00297                         <span class="keywordflow">if</span>(position == 0){
<a name="l00298"></a>00298                                 <span class="comment">//区域的第一行是不限</span>
<a name="l00299"></a>00299                                 <span class="keywordflow">return</span> mHelper.<a class="code" href="classcom_1_1zxx_1_1sql_1_1_data_base_helper.html#ac07978f4e7858ba1fdc4ee3cf70b38c1" title="获取列表剩余项目">getSortListRest</a>();
<a name="l00300"></a>00300                         }<span class="keywordflow">else</span>{
<a name="l00301"></a>00301                                 TOTALPRICEKIND kind = TOTALPRICEKIND.values()[position];
<a name="l00302"></a>00302                                  <span class="keywordflow">switch</span>(kind)
<a name="l00303"></a>00303                                  {
<a name="l00304"></a>00304                                  <span class="keywordflow">case</span> ALL:{
<a name="l00305"></a>00305                                          <span class="keywordflow">return</span> mHelper.<a class="code" href="classcom_1_1zxx_1_1sql_1_1_data_base_helper.html#ac07978f4e7858ba1fdc4ee3cf70b38c1" title="获取列表剩余项目">getSortListRest</a>();
<a name="l00306"></a>00306                                  }
<a name="l00307"></a>00307                                  <span class="keywordflow">case</span> BELOW100W:{
<a name="l00308"></a>00308                                          <span class="keywordflow">return</span> mHelper.<a class="code" href="classcom_1_1zxx_1_1sql_1_1_data_base_helper.html#a8c36701e1a6550ae6e9c9fd212118cd2" title="获取总价格剩余项目(小于100W)">getTotalPricebelow100W</a>();
<a name="l00309"></a>00309                                  }
<a name="l00310"></a>00310                                  <span class="keywordflow">case</span> BETWEEN100W_200W: {
<a name="l00311"></a>00311                                           <span class="keywordflow">return</span> mHelper.<a class="code" href="classcom_1_1zxx_1_1sql_1_1_data_base_helper.html#a1a573af5e5dc2e3da464db8306ac202f" title="获取总价格剩余项目(100W_200W之间)">getTotalPrice100W_200W</a>();
<a name="l00312"></a>00312                                   }
<a name="l00313"></a>00313                                   <span class="keywordflow">case</span> ABOVE_200W: {
<a name="l00314"></a>00314                                           <span class="keywordflow">return</span> mHelper.<a class="code" href="classcom_1_1zxx_1_1sql_1_1_data_base_helper.html#ac8d51264dab4db042d6fc81f31b7a67b" title="获取总价格剩余项目(大于200Ｗ)">getTotalPriceabove200W</a>();
<a name="l00315"></a>00315                                   }
<a name="l00316"></a>00316                                   <span class="keywordflow">default</span>:
<a name="l00317"></a>00317                                           <span class="keywordflow">return</span> mHelper.<a class="code" href="classcom_1_1zxx_1_1sql_1_1_data_base_helper.html#ac07978f4e7858ba1fdc4ee3cf70b38c1" title="获取列表剩余项目">getSortListRest</a>();
<a name="l00318"></a>00318                                  }
<a name="l00319"></a>00319                         }
<a name="l00320"></a>00320                 }
<a name="l00321"></a>00321         }
<a name="l00322"></a>00322         
<a name="l00329"></a><a class="code" href="classcom_1_1zxx_1_1sql_1_1sql_man.html#a5e18d0bd4b1170a043a4b43f32f651f7">00329</a>         <span class="keyword">public</span> <span class="keywordtype">int</span> <a class="code" href="classcom_1_1zxx_1_1sql_1_1sql_man.html#a5e18d0bd4b1170a043a4b43f32f651f7">getHouseTypeRow</a>(<span class="keywordtype">int</span> position) {
<a name="l00330"></a>00330                 String text = mAppContext.getResources().getString(houseTypeIds[position]);
<a name="l00331"></a>00331                 String args[] = <span class="keyword">new</span> String[]{text+<span class="stringliteral">&quot;%&quot;</span>};
<a name="l00332"></a>00332                 <span class="keywordflow">return</span> mHelper.<a class="code" href="classcom_1_1zxx_1_1sql_1_1_data_base_helper.html#a97a296a026ae1dffff131cdf5e3b5575" title="获取按房子类型的剩余屋子总数">getHouseTypeRest</a>(args);
<a name="l00333"></a>00333                 
<a name="l00334"></a>00334         }
<a name="l00341"></a><a class="code" href="classcom_1_1zxx_1_1sql_1_1sql_man.html#adb9f43d7a23c7db4adc2978b96c7feda">00341</a>         <span class="keyword">public</span> <span class="keywordtype">int</span> <a class="code" href="classcom_1_1zxx_1_1sql_1_1sql_man.html#adb9f43d7a23c7db4adc2978b96c7feda">getZXTypeRow</a>(<span class="keywordtype">int</span> position) {
<a name="l00342"></a>00342                  <span class="keywordtype">int</span> resID = <a class="code" href="classcom_1_1zxx_1_1common_1_1_common.html" title="公共通用类，目前包含了消息和字符串">Common</a>.GetZXid(position);
<a name="l00343"></a>00343                  String strText = mAppContext.getResources().getString(resID);
<a name="l00344"></a>00344                 String args[] = <span class="keyword">new</span> String[]{strText};
<a name="l00345"></a>00345                 <span class="keywordflow">return</span> mHelper.<a class="code" href="classcom_1_1zxx_1_1sql_1_1_data_base_helper.html#a09d0383cf37d1e8b86acb34b447e97b4" title="获取按装修类型的房子剩余总数">getZXTypeRest</a>(args);
<a name="l00346"></a>00346         }
<a name="l00347"></a>00347         
<a name="l00354"></a><a class="code" href="classcom_1_1zxx_1_1sql_1_1sql_man.html#a51310f84ffa54239860ee1edb78bc8da">00354</a>         <span class="keyword">public</span> <span class="keywordtype">int</span> <a class="code" href="classcom_1_1zxx_1_1sql_1_1sql_man.html#a51310f84ffa54239860ee1edb78bc8da">getPmPriceAllrow</a>(<span class="keywordtype">int</span> position) {
<a name="l00355"></a>00355                 PMPRICEKIND kind = PMPRICEKIND.values()[position];
<a name="l00356"></a>00356                  <span class="keywordflow">switch</span>(kind)
<a name="l00357"></a>00357                  {
<a name="l00358"></a>00358                  <span class="keywordflow">case</span> BELOW1W:{
<a name="l00359"></a>00359                          <span class="keywordflow">return</span> mHelper.<a class="code" href="classcom_1_1zxx_1_1sql_1_1_data_base_helper.html#a8049b88898ba4ac2d5f419cd3acf3e92" title="获取单价剩余项目(小于1W)">getPmPriceBELOW1W</a>();
<a name="l00360"></a>00360                  }
<a name="l00361"></a>00361                  <span class="keywordflow">case</span> BETWEEN1W_2W: {
<a name="l00362"></a>00362                           <span class="keywordflow">return</span> mHelper.<a class="code" href="classcom_1_1zxx_1_1sql_1_1_data_base_helper.html#ad9f82a031e22b1c73f1ee42bf39aa803" title="获取单价剩余项目(1W_2W之间)">getPmPrice1W_2W</a>();
<a name="l00363"></a>00363                   }
<a name="l00364"></a>00364                   <span class="keywordflow">case</span> ABOVE_2W: {
<a name="l00365"></a>00365                           <span class="keywordflow">return</span> mHelper.<a class="code" href="classcom_1_1zxx_1_1sql_1_1_data_base_helper.html#a83b37eb5a06585c21f6343622bcb19ed" title="获取单价剩余项目(大于2Ｗ)">getPmPriceabove2W</a>();
<a name="l00366"></a>00366                   }
<a name="l00367"></a>00367                   <span class="keywordflow">default</span>:
<a name="l00368"></a>00368                           <span class="keywordflow">return</span> mHelper.<a class="code" href="classcom_1_1zxx_1_1sql_1_1_data_base_helper.html#ac07978f4e7858ba1fdc4ee3cf70b38c1" title="获取列表剩余项目">getSortListRest</a>();
<a name="l00369"></a>00369                  }
<a name="l00370"></a>00370         }
<a name="l00371"></a>00371 }
</pre></div></div><!-- contents -->


<hr class="footer"/><address class="footer"><small>
Generated at 2015年二月4日 星期三 18:11:09 for zxxhouse by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.7.6.1
</small></address>

</body>
</html>
